package com.example.demo.entity;

        import lombok.Data;

/**
 * @author ws
 * @since 2023-08-25
 */
@Data
public class TrafCrossDistance implements Comparable<TrafCrossDistance> {
    private Long crossNo;
    private double distance;

    public TrafCrossDistance(Long crossNo, double distance) {
        this.crossNo = crossNo;
        this.distance = distance;
    }

    @Override
    public int compareTo(TrafCrossDistance other) {
        return Double.compare(this.distance, other.distance);
    }

    // getter...
}